/*
 * @Author: 李无敌
 * @Date: 2025-07-30 11:14:11
 * @LastEditors: 李无敌
 * @LastEditTime: 2025-08-05 14:59:09
 * @FilePath: \nest-base\src\modules\auth\dto\login.dto.ts
 */
import { IsNotEmpty, IsString, Length } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class LoginDto {
  @ApiProperty({ example: 'lwd', description: '用户名' })
  @IsNotEmpty({ message: '用户名不能为空' })
  @IsString({ message: '用户名必须是字符串' })
  @Length(4, 50, { message: '用户名长度必须在4-50个字符之间' })
  username: string;

  @ApiProperty({ example: '123456', description: '密码' })
  @IsNotEmpty({ message: '密码不能为空' })
  @IsString({ message: '密码必须是字符串' })
  @Length(6, 50, { message: '密码长度必须在6-50个字符之间' })
  password: string;
} 